from django.conf.urls.defaults import *
from django.conf import settings
from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',)
if settings.DJANGO_STATIC_MEDIA == True:
    urlpatterns += patterns('', (r'^static/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}),)

urlpatterns += patterns('',
    
    (r'^%s/' % settings.DAJAXICE_MEDIA_PREFIX, include('dajaxice.urls')),
    
    (r'^admin/', include(admin.site.urls)),
    (r'^api/', include('api.urls')),
    
    #Listados
    url(r'^accesos/', 'website.views.listado_accesos',name="listado_index"),
    url(r'^camaras/', 'website.views.listado_camaras',name="listado_camaras"),
    url(r'^carreteras/', 'website.views.listado_carreteras',name="listado_carreteras"),
    url(r'^puertos/', 'website.views.listado_puertos',name="listado_puertos"),
    
    url(r'^$', 'website.views.index',name="index"),
    url(r'^api/', 'website.views.api',name="api"),
    url(r'^faq/', 'website.views.faq',name="faq"),
)
